﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using EasyClassServer.Net;
using EasyClassServer.Application;

namespace EasyClassServer.Application.Index
{
    class Index : IApplication
    {
        public string Name => "";

        public HttpResponseArgs Handle(HttpArgs args)
        {
            return new HttpResponseArgs
            {
                Code = HttpCode.Sucsess,
                Message = "Welcome to use EasyServer!",
                Data = new IndexModel
                {
                    Version = "v0.0.1",
                    Date = DateTime.Now.ToString("yyyy-MM-dd"),
                    Time = DateTime.Now.ToString("HH:mm:ss")
                }
            };
        }
    }
}
